package edu.sctu.practice.class02.renzhaoxu.test02;

/**
 * Created by Administrator on 2015/10/15.
 */
public  class Vehicle{

    double speed;
    double size;

    public void move(){

    }

    public void setSpeed(int speed){
        this.speed = speed;

    }

    public void speedUp(){

        speed = speed+1;
        this.speed = speed;
    }

    public  void speedDown(){

        speed = speed-1;
        this.speed = speed;
    }

    public static void main(String[] args) {

        Vehicle car = new Vehicle();
        car.speed =50;
        car.size =40;
        car.speedUp();
        car.speedDown();
        System.out.println("速度"+car.speed);
    }

}